package com.tjrac.generalpermissions.domain;

/**
 * 权限角色映射表实体类
 *
 * @author ZeNing
 * @create 2020-11-22 15:39
 */
public class RolePermission {

    private Integer id;                 //映射表id 主键 自增
    private Role role;                  //角色
    private Permission permission;      //权限

    public RolePermission() {
    }

    public RolePermission(Integer id) {
        this.id = id;
    }

    public RolePermission(Role role, Permission permission) {
        this.role = role;
        this.permission = permission;
    }

    public RolePermission(Integer id, Role role, Permission permission) {
        this.id = id;
        this.role = role;
        this.permission = permission;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Permission getPermission() {
        return permission;
    }

    public void setPermission(Permission permission) {
        this.permission = permission;
    }

    @Override
    public String  toString() {
        return "RolePermission{" +
                "id=" + id +
                ", role=" + role +
                ", permission=" + permission +
                '}';
    }
}
